This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
I once wrote a small LotusScript Function for this; see below. Hope it will work for you.
NO WARRANTIES (since this is for banks ;-)
<EDIT>
Ouch, 24 digits is more than the precision of a Double, so it won't work I'm afraid.
You'll probably have to resort to Java; see class BigInteger.
</EDIT>
'/** ' * Max Long value ' */ PublicConst N_LS_MAXLONG& = 2147483647' &h7FFFFFFF
'/** ' * Performs a Modulo operation, where the left operand can be greater than <code>N_LS_MAXLONG</code>. ' * @param leftOp left operand ' * @param rightOp right operand ' * @return the value of <code>leftOp Mod rightOp</code>, if <code>Abs(leftOp) <= N_LS_MAXLONG</code>, otherwise the value of <code>leftOp - Fix(leftOp/rightOp) * rightOp</code>. ' * @error 11 (ErrDivisionByZero) if <code>rightOp</code> is zero. ' */ PublicFunction BigMod(ByVal leftOp AsDouble, ByVal rightOp AsLong) AsLong IfAbs(leftOp) <= N_LS_MAXLONG Then
BigMod = leftOp Mod rightOp Else
BigMod = leftOp - Fix(leftOp/rightOp) * rightOp EndIf EndFunction
Feedback response number JSAK9G9PQW created by ~Tip Zekjumitexakol on 02/12/2014